home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_Tix.idb / usr / freeware / lib / tix4.1 / demos / samples / Sample.tcl.z / Sample.tcl
Encoding:
Text File  |  1999-01-26  |  868 b   |  33 lines

  1. # Tix Demostration Program
  2. #
  3. # This sample program is structured in such a way so that it can be
  4. # executed from the Tix demo program "widget": it must have a
  5. # procedure called "RunSample". It should also have the "if" statment
  6. # at the end of this file so that it can be run as a standalone
  7. # program using tixwish.
  8.  
  9. # REPLACE WITH DESCRIPTION OF THIS DEMO.
  10. #
  11.  
  12. proc RunSample {w} {
  13.     set top [frame $w.f -bd 1 -relief raised]
  14.     set box [tixButtonBox $w.b -bd 1 -relief raised]
  15.  
  16.     pack $box -side bottom -fill both
  17.     pack $top -side top -fill both -expand yes
  18.  
  19.  
  20.     # Create the buttons
  21.     #
  22.     $box add ok     -text Ok     -command "destroy $w" -width 6
  23.     $box add cancel -text Cancel -command "destroy $w" -width 6
  24. }
  25.  
  26. if {![info exists tix_demo_running]} {
  27.     wm withdraw .
  28.     set w .demo
  29.     toplevel $w
  30.     RunSample $w
  31.     bind $w <Destroy> exit
  32. }
  33.